from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager

# 启动Chrome浏览器
driver = webdriver.Chrome()

# 访问故宫博物院的购票页面
driver.get('https://ticket.dpm.org.cn/')


# 等待登录完成
WebDriverWait(driver, 10).until(
    EC.presence_of_element_located((By.ID, 'ticket-selection'))
)